<!DOCTYPE html>
<html>

<head>
    <title>门店会员关联表</title>
    <#include "/header.html">
</head>

<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline" role="form">
                <div class="form-group">
                    <a @click="reset">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.username" placeholder="姓名(公司名称)">
                </div>&nbsp;&nbsp;&nbsp;
                <a class="btn btn-primary btn-sm " @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </form>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default" align="center">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group" v-show="title=='修改'">
                <div class="col-sm-2 control-label">用户ID</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="storeMember.memberId" placeholder="用户id" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"><span style="color: red">* </span>会员名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model.trim="storeMember.name" placeholder="请勿填写手机号码或纯数字" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">手机</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model.trim="storeMember.mobile" placeholder="手机" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">联系人</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="storeMember.nickname" placeholder="联系人" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">地址</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="storeMember.addr" placeholder="地址" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">挂账客户</div>
                <div class="col-sm-10">
                    <select v-model="storeMember.hangsAccountCustomer" class="form-control input-sm" name="memberLvId">
                        <option value=0>否</option>
                        <option value=1>是</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">固定电话</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="storeMember.tel" placeholder="固定电话" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">门店业务员</div>
                <div class="col-sm-10">
                    <select v-model="storeMember.merchantsSalesMan" class="form-control input-sm">
                        <option  v-for="item  in sellernames" :value="item.username" >{{item.username}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">价格账套</div>
                <div class="col-sm-10">
                    <select v-model="storeMember.priceSet" class="form-control input-sm">
                        <option value="" >无</option>
                        <option  v-for="item  in storeFavouredPriceEntityList" :value="item.favouredId" >{{item.favouredName}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary  btn-sm" @click="saveOrUpdate" value="确定" /> &nbsp;&nbsp;
                <input type="button" class="btn btn-warning  btn-sm" @click="reload" value="返回" />
            </div>
        </form>
    </div>

    <!--预存款充值-->
    <el-dialog
            title="预存款充值"
            size="small"
            :visible.sync="dialogVisible"
            width="600px" >
        <p style="padding-left: 20px;">用户当前预存款 :  {{advance}}</p>
        <el-form ref="form" label-width="80px">
            <el-form-item label="充值金额">
                <el-input v-model="count">请输入充值金额</el-input>
            </el-form-item>
            <el-form-item label="充值方式">
                <el-switch
                        v-model="payWay"
                        active-value="1"
                        inactive-value="0"
                        active-text="扫码充值"
                        inactive-text="现金充值"
                        @change="changePayWay"
                >
                </el-switch>
            </el-form-item>
            <el-form-item label="串码" v-if="payWay==1">
                <el-input v-model="serialCode" ref="serialCodeRef" @change="serialCodeChange">扫码枪扫描串码</el-input>
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
    <el-button size="small" @click="dialogVisible = false">取 消</el-button>
    <el-button size="small" type="primary" @click="addAdvance" v-show="payWay=='0'">确 定</el-button>
  </span>
    </el-dialog>
</div>

<script src="${request.contextPath}/statics/js/modules/storeMember/storemember.js?_${.now?long}"></script>
</body>

</html>
